<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>查看留言</title> 
    <link rel="shortcut icon" href="/favicon.ico"> 
    <link href="/public/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/public/admin/css/animate.css" rel="stylesheet">
    <link href="/public/admin/css/style.css?v=4.0.0" rel="stylesheet">
    <link href="/public/admin/js/plugins/layer/skin/layer.css" rel="stylesheet">
    <base target="_blank">
<!-- 全局js -->
<script src="/public/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/admin/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/public/admin/js/plugins/layer/layer.min.js"></script> 
<!-- 自定义js -->
<script src="/public/admin/js/content.js?v=1.0.0"></script>
<script src="/public/admin/js/contabs.js"></script>
<script src="/public/admin/js/common.js"></script>
<script src="/public/admin/js/article.js"></script> 

<!-- Bootstrap table -->
<script src="/public/admin/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/public/admin/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/public/admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>    
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>留言内容</h5> 
                </div>
                <div class="ibox-content">
                            <div class="box">
                                <div class="box-body">
                                    <div class="row">
                                    <form action="" method="post" id="msgFrom" onsubmit="return false;" class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">学号：</label>
                                            <div class="col-sm-8">
                                                <p class="form-control-static">{$msg.user_name}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">姓名：</label>
                                            <div class="col-sm-8">
                                                <p class="form-control-static">{$msg.nick_name}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">留言内容：</label>
                                            <div class="col-sm-8">
                                                <p class="form-control-static">{$msg.content}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">留言时间：</label>
                                            <div class="col-sm-8">
                                                <p class="form-control-static">{$msg.add_time|date='Y-m-d H:i:s'}</p>
                                            </div>
                                        </div>
                                        {if $msg['is_read'] == 0}
                                        <div class="form-group">
                                            <div class="col-sm-4 col-sm-offset-2">
                                                <input type="hidden" name="id" value="{$msg.id}">
                                                <button class="btn btn-primary" onclick="ajax_submit_form('msgFrom','{:url('Message/msgisRead')}')" type="button">标记为已读</button>
                                            </div>
                                        </div>
                                        {/if}
                                    </form>
                                        <div class="hr-line-dashed"></div>
                                        <form id="replyForm">
                                            <div class="form-horizontal">
                                                <div class="form-group">
                                                    <label class="col-sm-2 control-label">回复：</label>
                                                    <div class="col-sm-8">
                                                        <textarea class="form-control" style="height:100px" name="reply">{$msg.reply|raw}</textarea>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-4 col-sm-offset-2">
                                                        <input type="hidden" name="id" value="{$msg.id}">
                                                        <button class="btn btn-primary" onclick="ajax_submit_form('replyForm','{:url('Message/reply')}')" type="button">确认回复</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div> <!-- /.box-body -->
                           </div><!-- /.box -->
                </div>
            </div>
        </div>
    </div> 
</div> 


<input id="handle_status" value="" hidden="hidden">
<script>

function delarticle(obj,name,id,url) {
    top.layer.confirm(name,{
        icon : 3,
        btn:['确定','取消'],
    } , function(){
        $.ajax({
            url : url,
            type : "post",
            data : {id:id,act:'del'},
            dataType : "json",
            success:function(data){
                if (data.status == 0) { 
                    top.layer.msg(data.message);
                } else {
                    top.layer.msg(data.message);
                    $(obj).parent().parent().remove();
                }
            }
        });
    } , function(){
        layer.close(); //再执行关闭 
    })
}
 

</script>

</body>

</html>